#!/usr/bin/env python
from lib.HandleMysql import *
from lib.handle_mongo import *
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

#mysql - product
def set_prod_conn():    
    conn = HandleMysql('productv3-s.db.58dns.org','58885','rdpln58read','H5t8uV59niBZ5ABe5','dbwww58com_product_v3')
    conn.connect()
    return conn
#mysql - jingjia
def set_jingjia_conn():    
    conn = HandleMysql('jingjiainfo-s.db.58dns.org','58885','jj58user_rd','cVJrlY8wcLlZdfgtt','dbwww58com_jingjiainfo')
    conn.connect()
    return conn
#mysql - dict
def set_dict_conn():    
    conn = HandleMysql('10.5.20.16','58885','ec_stat','L#c8UM5RGh5C','dbwww58com_base_dicts')
    conn.connect()
    return conn

#mysql - infobright
def set_ib_conn():    
    conn = HandleMysql('10.5.20.15','5029','root','group_buytj1140','jingjia')
    conn.connect()
    return conn
#mysql - ads
def set_ads_conn():    
    conn = HandleMysql('10.5.20.16','58885','ec_stat','L#c8UM5RGh5C','dbwww58com_precision_ads')
    conn.connect()
    return conn

#mysql - infobright
def set_pv_conn():    
    conn = HandleMysql('10.5.20.15','5029','root','group_buytj1140','58')
    conn.connect()
    return conn

#mysql - stats
def set_stats_conn():    
    conn = HandleMysql('10.5.20.16','58885','ec_stat','L#c8UM5RGh5C','dbwww58com_58_stats')
    conn.connect()
    return conn

#mysql - order
def set_order0_conn():    
    conn = HandleMysql('192.168.12.81','58885','syzn58user_rd','FwE6dfgtpas12t6m','dbwww58com_pay_order_0')
    conn.connect()
    return conn
#mysql - order
def set_order1_conn():    
    conn = HandleMysql('192.168.12.81','58885','syzn58user_rd','FwE6dfgtpas12t6m','dbwww58com_pay_order_1')
    conn.connect()
    return conn
#mysql - order
def set_order2_conn():    
    conn = HandleMysql('192.168.12.81','58886','syzn58user_rd','FwE6dfgtpas12t6m','dbwww58com_pay_order_2')
    conn.connect()
    return conn
#mysql - order
def set_order3_conn():    
    conn = HandleMysql('192.168.12.81','58886','syzn58user_rd','FwE6dfgtpas12t6m','dbwww58com_pay_order_3')
    conn.connect()
    return conn